home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / MacOS / QuickDraw™ 3D 1.0.6F4 SDK / Samples / SampleCode / Tumbler and Podium / Tumbler_main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-08  |  1.6 KB  |  71 lines  |  [TEXT/MPS ]

  1. //        Tumbler_main.c
  2. //
  3. //        main function for the Tumbler application
  4. //
  5. //        Author:        Nick Thompson & Pablo Fernicola, with thanks to the QuickDraw 3D team
  6. //        Date:        Tuesday, January 14, 1992
  7. //
  8. //        Copyright © 1992-95 Apple Computer, Inc., All Rights Reserved
  9. //
  10. //
  11.  
  12.  
  13.  
  14. #include <ToolUtils.h>
  15.  
  16. #define    _AllocateGlobals_
  17.  
  18. #include "Tumbler_globals.h"
  19. #include "Tumbler_prototypes.h"
  20.  
  21. #include "Tumbler_AEVT.h"
  22.  
  23. #undef _AllocateGlobals_
  24.  
  25. #include "Tumbler_main.h"
  26. #include "Tumbler_initialize.h"
  27. #include "Tumbler_AEVT.h"
  28. #include "Tumbler_event.h"
  29. #include "Tumbler_podium.h"
  30.  
  31.  
  32. #include "MyErrorHandler.h"
  33.  
  34. main(void)
  35.  
  36. {
  37.     const short kNumMoreMasters = 10 ;
  38.     
  39.     InitializeToolbox();
  40.     
  41.     SetCursor(*GetCursor(watchCursor)) ;
  42.     
  43. #ifdef PODIUM_APP
  44.     Podium_Init() ;    
  45. #endif
  46.  
  47.     SplashSetUp() ;                            // put up a pretty picture to while away the time
  48.     
  49.     InitializeAppStuff( kNumMoreMasters ) ;    // call maxApplZone and moremasters
  50.     
  51.     InitializeGlobals();                    // init our app globals
  52.     InitAEStuff();                            // install our appleevent handlers
  53.     SetupMenus();                            // setup them menus
  54.     
  55.     // install the error & warning handler - these get called whenever
  56.     // errors or warnings occur, which means we don't have to check so 
  57.     // much, since the debugging version of the library will let 
  58.     // you know about problems
  59.     Q3Error_Register( MyErrorHandler, 0L );        
  60.     Q3Warning_Register( MyWarningHandler, 0L );        
  61.  
  62.     
  63.     SetCursor(&qd.arrow) ;                    // set up the cursor to something useful
  64.     
  65.     SplashTearDown() ;                        // get rid of the splash screen
  66.  
  67.     EventLoop();                            // process events until the user quits
  68.  
  69.     DeallocateGlobals();
  70. }
  71.